<template>
  <button @click="say('hello')">Say hello</button>
  <button @click="say('bye')">Say bye</button>
  <!-- 单击事件将停止传递 -->
  <div @click="handleParent">
    <button @click.stop="doThis">点我不触发父级 </button>
  </div>
  <!-- 提交事件将不再重新加载页面 -->
  <form @submit.prevent="onSubmit">2222</form>
</template>
<script setup>
import { ref, computed } from "vue";
function say(message) {
  console.log(message);
}
function doThis(){
  console.log('sapn');
}
function handleParent(){
  console.log('不会触发');
}
function onSubmit(){
  console.log('禁止表单提交');
}
</script>
